<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" href="Public/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="Public/Admin/Css/common.css" />
	<script src="Public/admin/Js/jquery-1.7.2.min.js"></script>
	<script>
		$(function(){
			$('#sort').live('blur',function(){
				$bid=$(this).parents('.info').find('.bid').html();
				$bid=parseInt($bid);
				$sort=$(this).val();
				$.ajax({
					type:"post",
					url:"./index.php?m=Admin&c=Brand&a=sort",
					data:{sort:$sort,bid:$bid},
				});
				window.location.reload();
			})
		})
	</script>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<form action="" method='post'>
		<table class="table table-bordered table-hover">
			<thead>	
				<tr>
					<th>品牌ID</th>
					<th>品牌名称</th>
					<th>LOGO</th>
					<th>排序</th>
					<th>是否热门</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ($data as $v){?>
					<tr class="info">
						<td class="bid"><?php echo $v['bid']?></td>
						<td><?php echo $v['bname']?></td>
						<td>
							<img src="<?php echo $v['logo']?>" alt="" />
						</td>
						<td>
							<input type="text" name='sort' value="<?php echo $v['sort']?>" id="sort" />
						</td>
						<td>
							<?php if($v['ishot']==1){?>
                是<?php }else{?>否
               <?php }?>
						</td>
						<td>
							<a href="<?php echo U('edit',array('bid'=>$v['bid']))?>" class="btn btn-warning"><i class="icon-pencil icon-white"></i>修改</a>
							<a href="<?php echo U('del',array('bid'=>$v['bid']))?>" class="btn btn-danger"><i class="icon-trash icon-white"></i>删除</a>
						</td>
					</tr>
				<?php }?>
				<!--<tr>-->
					<!--<td colspan='6' align='center'>-->
						<!--<input type="hidden" name='table' value='brand'/>-->
						<!--<input type="submit" value='排序' class="btn btn-success" />-->
					<!--</td>-->
				<!--</tr>-->
				</tbody>
		</table>
	</form>
	
	</div>
	</div>
	</div>
</body>
</html>